// 关于文章模块
import { reqGetArticleCate } from '@/api/article'
export default {
  state: {
    cateList: [] // 文章分类数据
  },
  mutations: {
    // 设置文章分类的mutation
    setCateList (state, list) {
      state.cateList = list
    }
  },
  actions: {
    // 获取文章分类的action
    async getCateList (context) {
      const { data } = await reqGetArticleCate()
      if (data.code === 0) {
        context.commit('setCateList', data.data)
      }
    }
  },
  getters: {},
  namespaced: true
}
